<?php

namespace App\Modules\Apicrzs\Http\Controllers\System;

use App\Modules\Admin\Services\System\SystemCityService;
use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Services\Public\SystemDeviceService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class SystemAreaController extends BaseApicrzsController
{
    public function __construct(SystemCityService $authService)
    {
        $this->service = $authService;
    }
    public function getAreaTree(Request $request): JsonResponse
    {
        $params = $request->all();

        $result = $this->service->getApiParentLists($params);
        return $this->sendApiSuccess($result, $this->service->getError());
    }
}
